zabbix_UserParameter_init:
  cmd.run:
    - cwd: /tmp
    - names:
      - mkdir -p /etc/zabbix/scripts
    - unless: test -d /etc/zabbix/scripts

zabbix_UserParameter_tcp_conf:
  file.managed:
    - name: /etc/zabbix/zabbix_agentd.d/userparameter_tcp_status.conf
    - source: salt://zabbix_UserParameter/zabbix_agentd.d/userparameter_tcp_status.conf

zabbix_UserParameter_tcp_scripts:
  file.managed:
    - name: /etc/zabbix/scripts/tcp_status.sh
    - source: salt://zabbix_UserParameter/scripts/tcp_status.sh




zabbix_UserParameter_scripts_init:
  cmd.run:
    - cwd: /tmp
    - names:
      - chown -R zabbix /etc/zabbix/scripts

zabbix_agent_restart:
  cmd.run:
    - names:
      - /etc/init.d/zabbix-agent restart
